-- GENERATED SPELL FOR [Baelok] --


function spell0_31159(pUnit, Event) --@Death Grip,n/a--
pUnit:FullCastSpellOnTarget(61094,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31159', 582, 1)
end

function spell1_31159(pUnit, Event) --@Draw Soul,n/a--
pUnit:FullCastSpellOnTarget(61090,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31159', 3000, 1)
end

function spell2_31159(pUnit, Event) --@Summon Dancing Runeblade,Self--
pUnit:FullCastSpellOnTarget(61086,pUnit)
pUnit:RegisterEvent('Sorts_31159', 20336, 1)
end

function Sorts_31159(pUnit, Event)
local choix_sorts_31159 = math.random(0, 2)
if choix_sorts_31159 == 0 then
pUnit:RegisterEvent('spell0_31159', 1, 1)
end
if choix_sorts_31159 == 1 then
pUnit:RegisterEvent('spell1_31159', 1, 1)
end
if choix_sorts_31159 == 2 then
pUnit:RegisterEvent('spell2_31159', 1, 1)
end
end

function mob31159_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31159', math.random(1500, 3000), 1)
end

function mob31159_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31159_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31159_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31159, 1, 'mob31159_Action')
RegisterUnitEvent(31159, 2, 'mob31159_Leave')
RegisterUnitEvent(31159, 3, 'mob31159_Kill')
RegisterUnitEvent(31159, 4, 'mob31159_Die')
